package com.ysh.function;

import com.ysh.pojo.User;

import java.util.function.BiFunction;

/**
 * 袁胜虎 on 2022/9/2 14:24
 */
public class BiFunctionTest {
    public static void main(String[] args){
        //两个参数一个返回结果
        BiFunction<String,Integer, User> biFunction = (name,age)->{
         User user = new User();
         user.setName(name);
         user.setAge(age);
         return user;
        };
        User user = biFunction.apply("liwei", 23);
        System.err.println(user);
    }
}
